home *** CD-ROM | disk | FTP | other *** search
/ MacPeople 1997 August 15 / MACPEOPLE-1997-08-15.ISO.7z / MACPEOPLE-1997-08-15.ISO / アップル関連 / ARA CO アップデート / モデム用追加分 / OMRON ME1414VB2 ARA2 / OMRON ME1414VB2 ARA2 next >
Text File  |  1995-11-22  |  12KB  |  606 lines

  1. !**************************************************************************
  2. !    OMRON ME1414VB2  ARA Ver2.0 JAPAN
  3. !    1994/11/1 Ver1.0
  4. ! 1995/3/9  Ver1.1
  5. ! 1995/11/22 Ver1.2
  6. !    Written by OMRON Corp 
  7. !
  8. !  'mlts' resource info for this modem:
  9. !    byte 1 == 01 -> modem HAS builtin reliability protocols
  10. !    byte 2 == 00 -> reserved by Apple
  11. !    byte 3 == 23 -> max hex chars in varstr 7 (35 dec)
  12. !    byte 4 == 23 -> max hex chars in varstr 8
  13. !    byte 5 == 23 -> max hex chars in varstr 9
  14. !    
  15. !**************************************************************************
  16. @ORIGINATE
  17. @ANSWER
  18. !------------------------
  19. ! reset the serial port
  20. !------------------------
  21. HSReset 0 0 0 0 0 0  
  22. @LABEL 1
  23. DTRClear
  24. pause 10
  25. DTRSet
  26. pause 3
  27. ! Mac talks to the modem at 14.400 bps.
  28. serreset 19200, 0, 8, 1
  29. setspeed 14400
  30. matchclr
  31. settries 0
  32. ! Modem initialize ATZ
  33. @LABEL 2
  34. matchclr
  35. matchstr 1 3 "OK¥13¥10"
  36. matchstr 2 3 "0¥13"
  37. write "ATZ¥13"
  38. matchread 15
  39. inctries
  40. iftries 3 3
  41. jump 2
  42. ! Modem Setting
  43. ! E0  - Command Echo Off
  44. ! Q0  - Command Response On
  45. ! V1  - Command Response Format Word
  46. ! M1  - Speaker moniter on until carrier detected <--- 1995/3/8
  47. ! &C1 - Carrier Signal Detect Carrier from the remote modem 
  48. ! &D2 - Data Terminal Ready Control On to Off on-hook
  49. ! &S1 - Activates DSR before handshaking
  50. ! ¥J0 - DTE Speed Setting 19200bps
  51. ! ¥V2 - Result Error Corection Type
  52. ! ¥N0 - Error Colection MNP-Off
  53. ! &M0 - Error Colection V.42-Off
  54. ! ¥Q3 - CTS Hardware flow Control
  55. ! S0=0 - Don't answer calls
  56. @LABEL 3
  57. matchclr
  58. matchstr 1 4 "OK¥13¥10"
  59. pause 2
  60. write "ATE0Q0V1M1&C1&D2&S1X4¥¥J0¥¥V2¥¥N0&M0¥¥Q3&E2S0=0¥13"
  61. matchread 15
  62. inctries
  63. iftries 3 81
  64. jump 3
  65. !-----------------------------------------
  66. ! Modem responding & configured.
  67. ! determine if reliable link is requested.
  68. !-----------------------------------------
  69. @LABEL 4
  70. ! if modem mnp10 link requested (var 4 == 2) then jump label 5
  71. ifstr 4 5 "2"
  72. !
  73. ! if modem v42 link requested (var 4 == 1) then jump label 6
  74. ifstr 4 6 "1"
  75. !
  76. ! if no modem v42 link requested (var 4 == 0) [same as ARA 1.0] then jump label 8
  77. ifstr 4 8 "0"
  78. !
  79. ! else invalid value in var 4; exit w/error
  80. jump 86
  81. !--------------------------------
  82. ! MNP10 Link Setting.
  83. !--------------------------------
  84. @LABEL 5
  85. matchclr
  86. matchstr 1 7 "OK¥13¥10"
  87. ! &M0 - V.42-Off
  88. ! ¥N3 - MNP-On
  89. ! ¥X0 - MNP10-On
  90. ! %C0 - DATACOMP-Off
  91. pause 2
  92. !write "AT&M0¥¥N3%C0¥13" <--- not MNP10 1995/3/8
  93. write "AT&M0¥¥N3¥¥X0%C0¥13"
  94. matchread 15
  95. inctries
  96. iftries 3 81
  97. jump 5
  98. !-----------------------------------------------------
  99. ! V.42bis Link Setting V.42bis --> MNP5 --> Normal
  100. !-----------------------------------------------------
  101. @LABEL 6
  102. matchclr
  103. matchstr 1 7 "OK¥13¥10"
  104. ! &M5 - v42 autoreliable mode
  105. pause 2
  106. write "AT¥¥N3&M5%C0¥13"
  107. matchread 15
  108. inctries
  109. iftries 3 81
  110. jump 6
  111. !------------------------------------------------------------------------
  112. ! If we DID support compression in the modem, this is where it would go.
  113. !------------------------------------------------------------------------
  114. @LABEL 7
  115. !
  116. !
  117. !
  118. !------------------------------------------------------------------------
  119. ! Set ID OMRON MD1414VB2.
  120. !------------------------------------------------------------------------
  121. @LABEL 8
  122. matchclr
  123. matchstr 1 9 "248¥13¥10¥13¥10OK¥13¥10"
  124. pause 2
  125. write "ATI0¥13"
  126. matchread 15
  127. inctries
  128. iftries 3 81
  129. jump 8
  130. !--------------------------------------------------------------------------
  131. ! If speaker on flag is true, jump to label 13.  Else turn off the speaker.
  132. !--------------------------------------------------------------------------
  133. @LABEL 9
  134. ifstr 2 13 "1"
  135. pause 5
  136. matchclr
  137. matchstr 1 13 "OK¥13¥10"
  138. pause 2
  139. write "ATM0¥13"
  140. matchread 15
  141. jump 81
  142. !*******************************************************************************
  143. ! modem ready, so enable answering or originate a call - label range is 11-30
  144. !
  145. !
  146. !*******************************************************************************
  147. @LABEL 13
  148. pause 5
  149. ifANSWER 71
  150. !
  151. ! if normal dialing (parm 6 == 0) jump to 19
  152. ifstr 6 19 "0"
  153. !
  154. ! if blind dialing (parm 6 == 1) jump to 17
  155. ifstr 6 17 "1"
  156. !
  157. ! if manual dialing (parm 6 == 2) jump to 15 
  158. ifstr 6 15 "2"
  159. !
  160. ! else invalid value in var 6; exit w/error
  161. jump 86
  162. !
  163. !
  164. !
  165. @label 15
  166. note "手動で発信をしています。" 3
  167. ! X1 to ignore dialtone & busy for manual dialing, D to dial
  168. write "ATX1D ¥13"
  169. jump 32
  170. !
  171. !
  172. !
  173. @label 17
  174. matchclr
  175. matchstr 1 19 "OK¥13¥10"
  176. ! X3 to ignore dialtone for blind dialing
  177. pause 2
  178. write "ATX3¥13"
  179. matchread 30
  180. jump 81
  181. !
  182. !
  183. !
  184. @label 19
  185. ! this is where we break up long dialstrings
  186. !
  187. ! parm 1 is always the full dialstring from the conn doc
  188. !note "Dialing ^1" 3
  189. note "^1に電話をしています。" 3
  190. ! parm 3 is always "p" for pulse & "t" for tone
  191. !
  192. ! if parm 8 == blank (complete dialstring in parm 7)
  193. !  then jump to label 27 & dial parm 7
  194. ifstr 8 27 " "
  195. !
  196. ! if parm 9 == blank (complete dialstring in parms 7 & 8)
  197. !  then jump to label 24 & dial parm 7 & 8
  198. ifstr 9 24 " "
  199. !
  200. !  else dial parm 7 & 8 & 9 (complete dialstring in parms 7, 8 & 9)
  201. matchclr
  202. matchstr 1 21 "OK¥13¥10"
  203. ! parm 7 holds first string fragment
  204. write "ATD^3^7;¥13"
  205. matchread 400
  206. ! modem not responding; bailout.
  207. jump 81
  208. !
  209. !
  210. !
  211. @label 21
  212. ! parm 8 holds second string fragment
  213. matchclr
  214. matchstr 1 22 "OK¥13¥10"
  215. write "ATD^3^8;¥13"
  216. matchread 400
  217. ! modem not responding; bailout.
  218. jump 81
  219. !
  220. !
  221. !
  222. @label 22
  223. ! parm 9 holds last string fragment
  224. write "ATD^3^9¥13"
  225. jump 32
  226. !
  227. !
  228. !
  229. !
  230. @label 24
  231. matchclr
  232. matchstr 1 25 "OK¥13¥10"
  233. ! parm 7 holds first string fragment
  234. write "ATD^3^7;¥13"
  235. matchread 400
  236. ! modem not responding; bailout.
  237. jump 81
  238. !
  239. !
  240. !
  241. @label 25
  242. ! parm 8 holds last string fragment
  243. write "ATD^3^8¥13"
  244. jump 32
  245. !
  246. !
  247. !
  248. @label 27
  249. ! parm 7 holds entire string
  250. write "ATD^3^7¥13"
  251. jump 32
  252. !***********************************************
  253. !    connecting - label range is 34-60
  254. !
  255. !
  256. !***********************************************
  257. @LABEL 32
  258. matchclr
  259. !
  260. matchstr 1  34 "CONNECT 1200¥13¥10"
  261. matchstr 2  35 "CONNECT 1200/REL3¥13¥10"
  262. matchstr 3  35 "CONNECT 1200/REL4¥13¥10"
  263. matchstr 4  36 "CONNECT 1200/REL4-10¥13¥10"
  264. matchstr 5  37 "CONNECT 1200/LAPM¥13¥10"
  265. !
  266. matchstr 6  38 "CONNECT 2400¥13¥10"
  267. matchstr 7  39 "CONNECT 2400/REL3¥13¥10"
  268. matchstr 8  39 "CONNECT 2400/REL4¥13¥10"
  269. matchstr 9  40 "CONNECT 2400/REL4-10¥13¥10"
  270. matchstr 10 41 "CONNECT 2400/LAPM¥13¥10"
  271. !
  272. matchstr 11 42 "CONNECT 4800¥13¥10"
  273. matchstr 12 43 "CONNECT 4800/REL3¥13¥10"
  274. matchstr 13 43 "CONNECT 4800/REL4¥13¥10"
  275. matchstr 14 44 "CONNECT 4800/REL4-10¥13¥10"
  276. matchstr 15 45 "CONNECT 4800/LAPM¥13¥10"
  277. !
  278. matchstr 16 46 "CONNECT 7200¥13¥10"
  279. matchstr 17 47 "CONNECT 7200/REL3¥13¥10"
  280. matchstr 18 47 "CONNECT 7200/REL4¥13¥10"
  281. matchstr 19 48 "CONNECT 7200/REL4-10¥13¥10"
  282. matchstr 20 49 "CONNECT 7200/LAPM¥13¥10"
  283. !
  284. matchstr 21 50 "CONNECT 9600¥13¥10"
  285. matchstr 22 51 "CONNECT 9600/REL3¥13¥10"
  286. matchstr 23 51 "CONNECT 9600/REL4¥13¥10"
  287. matchstr 24 52 "CONNECT 9600/REL4-10¥13¥10"
  288. matchstr 25 53 "CONNECT 9600/LAPM¥13¥10"
  289. !
  290. matchstr 26 54 "CONNECT 12000¥13¥10"
  291. matchstr 27 55 "CONNECT 12000/REL3¥13¥10"
  292. matchstr 28 55 "CONNECT 12000/REL4¥13¥10"
  293. matchstr 29 56 "CONNECT 12000/REL4-10¥13¥10"
  294. matchstr 30 57 "CONNECT 12000/LAPM¥13¥10"
  295. !
  296. matchstr 31 58 "CONNECT 14400¥13¥10"
  297. matchstr 32 59 "CONNECT 14400/REL3¥13¥10"
  298. matchstr 33 59 "CONNECT 14400/REL4¥13¥10"
  299. matchstr 34 60 "CONNECT 14400/REL4-10¥13¥10"
  300. matchstr 35 61 "CONNECT 14400/LAPM¥13¥10"
  301. !
  302. ! other result codes.
  303. !
  304. matchstr 36 72 "RING¥13¥10"
  305. matchstr 37 82 "NO DIALTONE¥13¥10"
  306. matchstr 38 83 "NO CARRIER¥13¥10"
  307. matchstr 39 83 "ERROR¥13¥10"
  308. matchstr 40 84 "BUSY¥13¥10"
  309. matchstr 41 85 "NO ANSWER¥13¥10"
  310. matchstr 42 87 "CONNECT¥13¥10"
  311. !
  312. matchread 700
  313. ifANSWER 32
  314. jump 81
  315. !------------------------------------------------------------
  316. !  THIS v32b modem has been setup to do cts handshaking,
  317. !  and we assume that a cts handshaking cable is being used,
  318. !  so we leave the serial port set to 19,200 bps.
  319. !------------------------------------------------------------
  320. @LABEL 34
  321. note "1200bpsで接続確認中" 3
  322. CommunicatingAt 1200
  323. jump 68
  324. !
  325. @LABEL 35
  326. note "1200bps-MNPで接続確認中" 3
  327. CommunicatingAt 1200
  328. jump 68
  329. !
  330. @LABEL 36
  331. note "1200bps-MNP10で接続確認中" 3
  332. CommunicatingAt 1200
  333. jump 68
  334. !
  335. @LABEL 37
  336. note "1200bps-V.42で接続確認中" 3
  337. CommunicatingAt 1200
  338. jump 68
  339. !
  340. !
  341. !
  342. @LABEL 38
  343. note "2400bpsで接続確認中" 3
  344. CommunicatingAt 2400
  345. jump 68
  346. !
  347. @LABEL 39
  348. note "2400bps-MNPで接続確認中" 3
  349. CommunicatingAt 2400
  350. jump 68
  351. !
  352. @LABEL 40
  353. note "2400bps-MNP10で接続確認中" 3
  354. CommunicatingAt 2400
  355. jump 68
  356. !
  357. @LABEL 41
  358. note "2400bps-V.42で接続確認中" 3
  359. CommunicatingAt 2400
  360. jump 68
  361. !
  362. !
  363. !
  364. ! note "4200bps........" -> "4800bps........" 1995/11/22
  365. @LABEL 42
  366. note "4800bpsで接続確認中" 3
  367. CommunicatingAt 4800
  368. jump 68
  369. !
  370. @LABEL 43
  371. note "4800bps-MNPで接続確認中" 3
  372. CommunicatingAt 4800
  373. jump 68
  374. !
  375. @LABEL 44
  376. note "4800bps-MNP10で接続確認中" 3
  377. CommunicatingAt 4800
  378. jump 68
  379. !
  380. @LABEL 45
  381. note "4800bps-V.42で接続確認中" 3
  382. CommunicatingAt 4800
  383. jump 68
  384. !
  385. !
  386. !
  387. @LABEL 46
  388. note "7200bpsで接続確認中" 3
  389. CommunicatingAt 7200
  390. jump 68
  391. !
  392. @LABEL 47
  393. note "7200bps-MNPで接続確認中" 3
  394. CommunicatingAt 7200
  395. jump 68
  396. !
  397. @LABEL 48
  398. note "7200bps-MNP10で接続確認中" 3
  399. CommunicatingAt 7200
  400. jump 68
  401. !
  402. @LABEL 49
  403. note "7200bps-V.42で接続確認中" 3
  404. CommunicatingAt 7200
  405. jump 68
  406. !
  407. !
  408. !
  409. @LABEL 50
  410. note "9600bpsで接続確認中" 3
  411. CommunicatingAt 9600
  412. jump 68
  413. !
  414. @LABEL 51
  415. note "9600bps-MNPで接続確認中" 3
  416. CommunicatingAt 9600
  417. jump 68
  418. !
  419. @LABEL 52
  420. note "9600bps-MNP10で接続確認中" 3
  421. CommunicatingAt 9600
  422. jump 68
  423. !
  424. @LABEL 53
  425. note "9600bps-V.42で接続確認中" 3
  426. CommunicatingAt 9600
  427. jump 68
  428. !
  429. !
  430. !
  431. @LABEL 54
  432. note "12000bpsで接続確認中" 3
  433. CommunicatingAt 12000
  434. jump 68
  435. !
  436. @LABEL 55
  437. note "12000bps-MNPで接続確認中" 3
  438. CommunicatingAt 12000
  439. jump 68
  440. !
  441. @LABEL 56
  442. note "12000bps-MNP10で接続確認中" 3
  443. CommunicatingAt 12000
  444. jump 68
  445. !
  446. @LABEL 57
  447. note "12000bps-V.42で接続確認中" 3
  448. CommunicatingAt 12000
  449. jump 68
  450. !
  451. !
  452. !
  453. @LABEL 58
  454. note "14400bpsで接続確認中" 3
  455. CommunicatingAt 14400
  456. jump 68
  457. !
  458. @LABEL 59
  459. note "14400bps-MNPで接続確認中" 3
  460. CommunicatingAt 14400
  461. jump 68
  462. !
  463. @LABEL 60
  464. note "14400bps-MNP10で接続確認中" 3
  465. CommunicatingAt 14400
  466. jump 68
  467. !
  468. @LABEL 61
  469. note "14400bps-V.42で接続確認中" 3
  470. CommunicatingAt 14400
  471. jump 68
  472. !
  473. !
  474. !
  475. @LABEL 68
  476. ! turn on cts handshaking.
  477. HSReset 0 1 0 0 0 0
  478. !
  479. pause 15
  480. ifANSWER 69
  481. pause 30
  482. @LABEL 69
  483. exit 0
  484. !************************************************************
  485. ! @ANSWER
  486. ! Set the modem to answer on 1st ring - label range is 71-80
  487. !
  488. !************************************************************
  489. @LABEL 71
  490. matchclr
  491. matchstr 1 32 "OK¥13¥10"
  492. pause 2
  493. write "ATS0=2¥13"
  494. matchread 30
  495. inctries
  496. iftries 3 81
  497. jump 71
  498. !
  499. @LABEL 72
  500. ifORIGINATE 32
  501. ! claim the serial port
  502. userhook 1
  503. note "電話がかかってきました。" 2
  504. jump 32
  505. !************************************************
  506. ! error messages - label range is 81-100
  507. !
  508. !
  509. !************************************************
  510. ! Modem Not Responding
  511. @LABEL 81
  512. exit -6019
  513. !
  514. ! No Dial Tone
  515. @LABEL 82
  516. note "電話回線が接続されていない。または、0発信をしている場合はダイヤルトーン検出無視にして下さい" 3
  517. exit -6020
  518. !
  519. ! No Carrier or Error
  520. @LABEL 83
  521. exit -6021
  522. !
  523. ! Busy
  524. @LABEL 84
  525. exit -6022
  526. !
  527. ! No Answer
  528. @LABEL 85
  529. exit -6023
  530. !
  531. ! varstring invalid value
  532. @LABEL 86
  533. exit -6027
  534. !
  535. ! Connect 300bps
  536. @LABEL 87
  537. exit -6002 "ARA doesn't support 300bps connection."
  538. !
  539. !********************************************
  540. ! Hang up the modem - label range is 101-120
  541. !
  542. !
  543. !********************************************
  544. @HANGUP
  545. @LABEL 102
  546. settries 0
  547. HSReset 0 0 0 0 0 0
  548. !----------------------------
  549. ! firstly try escape sequence
  550. !----------------------------
  551. @LABEL 105
  552. serreset 19200, 0, 8, 1
  553. setspeed 14400
  554. matchclr
  555. matchstr 1 108 "OK¥13¥10"
  556. pause 10
  557. write "+++"
  558. matchread 15
  559. inctries
  560. iftries 3 108
  561. jump 105
  562. !-------------------
  563. ! secondly try ATH
  564. !-------------------
  565. @LABEL 108
  566. matchclr
  567. matchstr 1 111 "NO CARRIER¥13¥10"
  568. matchstr 2 111 "OK¥13¥10"
  569. matchstr 3 111 "ERROR¥13¥10"
  570. write "ATH¥13"
  571. matchread 30
  572. inctries
  573. iftries 3 110
  574. jump 108
  575. !---------------------------------------
  576. ! finaly try On-to-Off DTR transitions
  577. !---------------------------------------
  578. @LABEL 110
  579. DTRSet
  580. pause 5
  581. DTRClear
  582. pause 5
  583. DTRSet
  584. flush
  585. jump 111
  586. !------------------------------
  587. ! recall the factory settings.
  588. !------------------------------
  589. @LABEL 111
  590. serreset 19200, 0, 8, 1
  591. setspeed 14400
  592. pause 15
  593. matchclr
  594. matchstr 1 114 "OK¥13¥10"
  595. write "ATS0=0¥13"
  596. matchread 30
  597. jump 81
  598. !
  599. @LABEL 114
  600. exit 0
  601.  
  602. !*********************************************************
  603. ! labels 121-128 are reserved for future emergency hacks
  604. !
  605. !
  606. !*********************************************************